package com.hom.test;

import java.io.File;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public class hom2 {
    public static void main(String[] args) {
        try {
            File file = new File("D:\\ioliu\\Test1.txt");

            ObjectInputStream ios = new ObjectInputStream(new FileInputStream(file));
            Student stu = (Student)ios.readObject();
            System.out.println(stu);

            ios.close();

        }catch(Exception ex){
            ex.printStackTrace();
        }
    }
}
